<%--
  Created by IntelliJ IDEA.
  User: dell
  Date: 2021/10/16
  Time: 15:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>用户管理</title>
    <style>
        #fenye{
            margin-left: 350px;
            margin-top: 30px;
        }
    </style>
</head>
<body bgcolor="aliceblue">

房态查询
<form action="http://localhost:8080/hostel_war_exploded/getHouseByState" method="post">
    <!--房态查询-->
    <input type="text" name="state" placeholder="请输入你要查询的房间状态" /><input type="submit" value="查询" />

</form>
房间查询
<form action="http://localhost:8080/hostel_war_exploded/queryByRoomName" method="post">
    <input type="text" name="name" placeholder="请输入你要查询的房间号"/><input type="submit" value="查询" />
</form>
房间类型查询
<form action="http://localhost:8080/hostel_war_exploded/queryByRoomType" method="post">
    <input type="text" name="type" placeholder="请输入你要查询的房间类型"/><input type="submit" value="查询" />
</form>
<br>
<!--列表展示-->
<table align="center" border="1px solid #ccc" width="1000px">
    <caption align="center"><strong>房间管理</strong></caption>
    <div class="yonghu">
        <thead>
        <th>id</th>
        <th>房间号</th>
        <th>可住人数</th>
        <th>单价</th>
        <th>所在楼层</th>
        <th>状态</th>
        <th>当前在住的客户</th>
        <th>房间类型</th>
        </thead>
    </div>
    <tbody>
    <!--使用jstl标签中的循环控制-->
    <c:forEach items="${pageData.data}" var="one">
        <tr>
            <td>${one.id}</td>
            <td>${one.name}</td>
            <td>${one.amount}</td>
            <td>${one.price}</td>
            <td>${one.floot_id}</td>
            <td>
                <c:if test="${one.state==1}">已预订</c:if>
                <c:if test="${one.state==0}">未预订</c:if>
            </td>
            <td>${one.customer}</td>
            <td>${one.type}</td>

           <%-- <td>&lt;%&ndash;<button><a href="#">编辑</a></button>&ndash;%&gt;
                <button><a href="${pageContext.request.contextPath}/deleteOne?id=${one.id}">删除</a></button>
                <button><a href="${pageContext.request.contextPath}/queryOne?id=${one.id}">修改</a></button>
            </td>--%>
        </tr>
    </c:forEach>

    </tbody>
</table>
<!--分页控制区-->
<div id="fenye">
    <!--${pageContext.request.contextPath}获取序列目录-->
    <button><a href="${pageContext.request.contextPath}/allHouseyyl?currentPage=1&pageSize=${pageData.pageSize}">首页</a></button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <button><a href="${pageContext.request.contextPath}/allHouseyyl?currentPage=${pageData.previousPage}&pageSize=${pageData.pageSize}">上一页</a></button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <button><a href="${pageContext.request.contextPath}/allHouseyyl?currentPage=${pageData.nextPage}&pageSize=${pageData.pageSize}">下一页</a></button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <button><a href="${pageContext.request.contextPath}/allHouseyyl?currentPage=${pageData.totalPages}&pageSize=${pageData.pageSize}">尾页</a></button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <span>当前第${pageData.currentPage}页，&nbsp;&nbsp;&nbsp;共有${pageData.totalPages}页，&nbsp;&nbsp;&nbsp;共有${pageData.totalSize}条记录</span>
</div>
</body>
<script>

</script>
</html>

